package com.ynet.middleground.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资源(接口)信息表
 * </p>
 *
 * @author yangbh
 * @since 2019-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ResourceConfig extends Model<ResourceConfig> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * dubbo接口
     */
    @TableField(value = "interface")
    private String interfaceName;

    /**
     * rest接口
     */
    @TableField(value = "resource_url")
    private String url;

    /**
     * 接口描述
     */
    private String resourceDesc;

    /**
     * 资源状态  0:正常  1:停用
     */
    @TableLogic
    private Boolean status;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 创建者
     */
    private Integer createBy;

    /**
     * 更新时间
     */
    private LocalDateTime gmtModified;

    /**
     * 更新者
     */
    private Integer modifiedBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
